# GENERATED BY: test/dependency_services/dependency_services_test.dart

$ cat pubspec.yaml
{"name":"myapp","dependencies":{"foo":"^1.0.0","bar":"^1.0.0"},"environment":{"sdk":"^3.0.2"}}
$ cat pubspec.lock
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  bar:
    dependency: "direct main"
    description:
      name: bar
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "1.0.0"
  foo:
    dependency: "direct main"
    description:
      name: foo
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "1.1.1"
sdks:
  dart: ">=3.0.2 <4.0.0"
-------------------------------- END OF OUTPUT ---------------------------------

## Section report
$ echo '{"target":"foo","disallowed":[{"name":"foo","url":"http://localhost:$PORT","versions":[{"range":"1.1.1"},{"range":"2.0.0"}]},{"name":"bar","url":"http://localhost:$PORT","versions":[{"range":"2.0.0"}]}]}' | dependency_services report
{
  "dependencies": [
    {
      "name": "foo",
      "version": "1.1.1",
      "kind": "direct",
      "source": {
        "type": "hosted",
        "description": {
          "name": "foo",
          "url": "http://localhost:$PORT",
          "sha256": "53f3a18765223a43b4bccbab66295ba6dff421b789150b099c831c442e31065a"
        }
      },
      "latest": "2.0.2",
      "constraint": "^1.0.0",
      "compatible": [],
      "singleBreaking": [],
      "multiBreaking": [
        {
          "name": "foo",
          "version": "2.0.2",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "ae6cae4af68be16abcdf61b3783a578ad6d44eef847fa97a7ec8056014bbe116"
            }
          },
          "constraintBumped": "^2.0.2",
          "constraintWidened": ">=1.0.0 <3.0.0",
          "constraintBumpedIfNeeded": "^2.0.2",
          "previousVersion": "1.1.1",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "53f3a18765223a43b4bccbab66295ba6dff421b789150b099c831c442e31065a"
            }
          }
        },
        {
          "name": "bar",
          "version": "2.2.0",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "bar",
              "url": "http://localhost:$PORT",
              "sha256": "3164dbf77eb95f3b0f81f3ce6daecebb934d35ad3e0c75448920d73397785843"
            }
          },
          "constraintBumped": "^2.2.0",
          "constraintWidened": ">=1.0.0 <3.0.0",
          "constraintBumpedIfNeeded": "^2.2.0",
          "previousVersion": "1.0.0",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "bar",
              "url": "http://localhost:$PORT",
              "sha256": "c6d045d6b6edfb503ae0e2a55114e888861505ccea817c08186ffc17975ea9fe"
            }
          }
        }
      ],
      "smallestUpdate": [
        {
          "name": "foo",
          "version": "2.0.1",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "f5f840bd364e147ba01a7c018354eab6afc656fa9abda43d048803a30c4a68a5"
            }
          },
          "constraintBumped": "^2.0.1",
          "constraintWidened": ">=1.0.0 <3.0.0",
          "constraintBumpedIfNeeded": "^2.0.1",
          "previousVersion": "1.1.1",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "foo",
              "url": "http://localhost:$PORT",
              "sha256": "53f3a18765223a43b4bccbab66295ba6dff421b789150b099c831c442e31065a"
            }
          }
        },
        {
          "name": "bar",
          "version": "2.2.0",
          "kind": "direct",
          "source": {
            "type": "hosted",
            "description": {
              "name": "bar",
              "url": "http://localhost:$PORT",
              "sha256": "3164dbf77eb95f3b0f81f3ce6daecebb934d35ad3e0c75448920d73397785843"
            }
          },
          "constraintBumped": "^2.2.0",
          "constraintWidened": ">=1.0.0 <3.0.0",
          "constraintBumpedIfNeeded": "^2.2.0",
          "previousVersion": "1.0.0",
          "previousConstraint": "^1.0.0",
          "previousSource": {
            "type": "hosted",
            "description": {
              "name": "bar",
              "url": "http://localhost:$PORT",
              "sha256": "c6d045d6b6edfb503ae0e2a55114e888861505ccea817c08186ffc17975ea9fe"
            }
          }
        }
      ]
    }
  ]
}

-------------------------------- END OF OUTPUT ---------------------------------

$ cat pubspec.yaml
{"name":"myapp","dependencies":{"foo":"^1.0.0","bar":"^1.0.0"},"environment":{"sdk":"^3.0.2"}}
$ cat pubspec.lock
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
  bar:
    dependency: "direct main"
    description:
      name: bar
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "1.0.0"
  foo:
    dependency: "direct main"
    description:
      name: foo
      sha256: $SHA256
      url: "http://localhost:$PORT"
    source: hosted
    version: "1.1.1"
sdks:
  dart: ">=3.0.2 <4.0.0"
